#include <stx/test/test.hpp>

TEST_CASE (core_libx)
{
    CHECK(std::list<int>{1, 3, 5} > std::list<int>{1, 2, 3, 4});
    CHECK(std::list<int>{1, 3, 5} >= std::list<int>{1, 2, 3, 4});
    CHECK(std::list<int>{1, 3, 5} == std::list<int>{1, 3, 5});
    CHECK(std::list<int>{1, 3, 5} <= std::list<int>{1, 3, 5});
    CHECK(std::list<int>{1, 3, 5} >= std::list<int>{1, 3, 5});
    CHECK(std::list<int>{1, 4, 5} > std::list<int>{1, 3, 5, 9});
    CHECK(std::list<int>{1, 4, 5} >= std::list<int>{1, 3, 5});
    CHECK(std::list<int>{1, 4, 5} < std::list<int>{9, 9});
    CHECK(std::list<int>{1, 4, 5} <= std::list<int>{9, 9});

    CHECK(!std::bit_cast<std::int64_t*>(nullptr));
    CHECK(!std::bit_cast<std::int64_t*>(Ptr<int const>(nullptr)));

    CHECK(ranges::size(" hello "sv | views::trim(::isspace)) == 5);
    CHECK(ranges::size(" hello "sv | views::trim_front(::isspace)) == 6);
    CHECK(ranges::size(" hello "sv | views::trim_back(::isspace)) == 6);
    CHECK(ranges::size(" hello "sv | views::trim_front(::isspace) |
                       views::trim_back(::isspace)) == 5);
}